<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateTeamMemberTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('team_member', function (Blueprint $table) {
            $table->increments('member_id');
            $table->string('member_name')->default('')->comment('成员姓名');
            $table->unsignedInteger('team_id')->comment('团队ID');
            $table->unsignedTinyInteger('status')->default('1')->comment('在职状态：1为在职，2为离职');
            $table->string('email')->nullable()->comment('邮箱地址');
            $table->string('phone_number')->nullable()->comment('手机号');
            $table->unsignedInteger('department_id')->comment('部门ID');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('team_member');
    }
}
